//
//  UIView+Extension.m
//  20151228LSWeibo
//
//  Created by Steven.Liu on 15/12/29.
//  Copyright © 2015年 Steven.Liu. All rights reserved.
//

#import "UIView+Extension.h"

@implementation UIView (Extension)

-(CGFloat)NK_x
{
    return self.frame.origin.x;
}
-(void)setNK_x:(CGFloat)NK_x
{
    CGRect frame = self.frame;
    frame.origin.x = NK_x;
    self.frame = frame;
}

-(CGFloat)NK_y
{
    return self.frame.origin.y;
}
-(void)setNK_y:(CGFloat)NK_y
{
    CGRect frame = self.frame;
    frame.origin.y = NK_y;
    self.frame = frame;
}

-(CGFloat)NK_centerX
{
    return self.center.x;
}
-(void)setNK_centerX:(CGFloat)NK_centerX
{
    CGPoint center = self.center;
    center.x = NK_centerX;
    self.center =center;
}

-(CGFloat)NK_centerY
{
    return self.center.y;
}
-(void)setNK_centerY:(CGFloat)NK_centerY
{
    CGPoint center = self.center;
    center.y = NK_centerY;
    self.center = center;
}

-(CGFloat)NK_width
{
    return self.frame.size.width;
}
-(void)setNK_width:(CGFloat)NK_width
{
    CGRect frame = self.frame;
    frame.size.width = NK_width;
    self.frame = frame;
}

-(CGFloat)NK_height
{
    return self.frame.size.height;
}
-(void)setNK_height:(CGFloat)NK_height
{
    CGRect frame = self.frame;
    frame.size.height = NK_height;
    self.frame = frame;
}

-(CGSize)NK_size
{
    return self.frame.size;
}
-(void)setNK_size:(CGSize)NK_size
{
    CGRect frame = self.frame;
    frame.size = NK_size;
    self.frame = frame;
}

-(CGPoint)NK_origin
{
    return self.frame.origin;
}
-(void)setNK_origin:(CGPoint)NK_origin
{
    CGRect frame = self.frame;
    frame.origin = NK_origin;
    self.frame = frame;
}

@end
